<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<base target="_blank"></base>
	<script type="text/javascript" src="/static/js/jquery-1.7.1.js"></script>
</head>
<body>
	
<a href="/shanshenmiao/list">list</a>
<br>
<a href="/shanshenmiao/crawler">crawler</a>
<br>
<button id="bat_crawler">批量抓取</button>
<span>抓取进度: <span id="crawl_status">未开始.</span></span>
<hr>

<a href="http://www.shenmu.com/pk/data">data</a>
</body>
<script type="text/javascript">
{literal}
var crawl_url = "/shanshenmiao/crawler";
var crawl_words = ["美女","高街","欧美范"];
var current_crawl_num = 0;
function batCrawl(){
	$.get(crawl_url,{q:crawl_words[current_crawl_num],p:1}, function(){
		current_crawl_num ++;
		if(current_crawl_num < crawl_words.length){
			$('#crawl_status').html(current_crawl_num);
			batCrawl();
		} else {
			$('#crawl_status').html('Done!')
			current_crawl_num = 0;
		}
	});
}
$('#bat_crawler').click(batCrawl);
{/literal}
</script>
</html>